
package cn.kgc.ffzw.fuxi;

import java.util.Scanner;

public class Family {
    public static void main(String[] args) {
        System.out.println("请输入要回谁家？1:父母家  2.我家  请选择：");
        int choose=new Scanner(System.in).nextInt();
        Person role=goHome(choose);
        role.doSth();
    }

    public static Person goHome(int choose){

        Person person=null;

        switch (choose){
        case 1:
            person=new Son();


        break;

        case 2:
            person=new Father();

            break;

        default:
            person=new Father();

        }
        return person;
    }

}
